Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Import Foxpro database into SQL server 2000

9 views
Skip to first unread message

teclioness

unread,
Nov 20, 2006, 4:48:01 AM11/20/06
to
Hi,

I have a PC which is on our office network, which has a .dbf files and one
.dbc file. The directory which has these files has been shared. I have no
idea of what version of foxpro files they are. I need to import it into SQL
server 2000 database.

I have downloaded the latest VFP driver on the server which has the SQL
server. Please let me know what are the steps involved in importing .dbf
files in SQL server 2000 database.

What I have done so far is created a System DSN on the SQL server machine
and as a VFP driver.

Please help.

P.S. I have read on the Internet about creating LInked server. What is the
best of way to move this forward, as I need to regularly import data into SQL
server 2000 database.
--
MCP

Allan Mitchell

unread,
Nov 20, 2006, 7:26:06 AM11/20/06
to
Hello teclioness,

In DTS you should be able to use "Other Connection" and point it at your
Foxpro DSN to do this

Regards

Allan Mitchell
Konesans Ltd
T +44 7966 476 572
F +44 2071 008 479
http://www.konesans.com

teclioness

unread,
Nov 20, 2006, 7:45:01 AM11/20/06
to
Thanks for your response Allan. I tried what you suggested, but it shows a
error window saying "Unexpected error occured. An error result was returned
without an error message."


--
MCP

Allan Mitchell

unread,
Nov 20, 2006, 8:04:31 AM11/20/06
to
Hello teclioness,

Are you using SSIS or DTS?

http://groups.google.co.uk/groups?q=foxpro%20dts&ie=UTF-8&oe=UTF-8&rls=org.mozilla:en-US:official&client=firefox-a&sa=N&tab=wg

Regards

Allan Mitchell
Konesans Ltd
T +44 7966 476 572
F +44 2071 008 479
http://www.konesans.com

> Thanks for your response Allan. I tried what you suggested, but it


> shows a error window saying "Unexpected error occured. An error result
> was returned without an error message."
>

teclioness

unread,
Nov 20, 2006, 8:41:03 AM11/20/06
to
Hi Allan,

I am using DTS. The scenario is as follows:
I have the foxpro tables sitting on a PC which is on Network. The folder
containing the database is shared and has been given read access to the
server which has SQL server 2000.
On the Server which is running SQL server 2000, I have created a System DSN
using VFP driver and pointing to the database on this shared folder.

Is this scenario sufficient enough to create and runa DTS??

Thanks for your help.
--
MCP

Cindy Winegarden

unread,
Nov 21, 2006, 6:21:59 PM11/21/06
to
Hi !

Are you using ODBC or OLE DB. OLE DB is preferable. The latest FoxPro and
Visual FoxPro OLE DB data provider is downloadable from
msdn.microsoft.com/vfoxpro/downloads/updates and it works for all versions
of FoxPro tables.

Set up your linked server as follows:

-- For the @DataSrc value, if your Fox tables are "free" tables (no DBC file
is present in the directory) use only the path to the directory and put
double quotes around it if it has spaces. Something like '"C:\My
Directory\"'
-- If a DBC files is present the @DataSrc value needs to point to the DBC
file as below.

EXEC master.dbo.sp_addlinkedserver
@server = N'VFP_NORTHWIND', -- Your linked server name here
@srvproduct=N'Visual FoxPro 9', -- can be anything
@provider=N'VFPOLEDB',
@datasrc=N'"C:\PROGRAM FILES\MICROSOFT VISUAL FOXPRO
9\Samples\Northwind\Northwind.dbc"',
@provstr=N'VFPOLEDB.1'

-- Then, you can query your tables like:

Select * From YourLinkedServer...YourTable

-- Note 3 dots, and don't use the DBF extension such as YourTable.dbf. Even
if your data source points to a DBC file just use the table name you want to
select from.

--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
ci...@cindywinegarden.com


"teclioness" <tecli...@discussions.microsoft.com> wrote in message
news:AC62B8F8-7C6A-400F...@microsoft.com...

0 new messages